package cn.topkinson.rocketmq.seckill.controller;

import cn.topkinson.rocketmq.seckill.service.SeckillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author huangzihao
 * @Date 2021/1/18 14:23
 */
@RestController
@RequestMapping("/seckill")
public class SeckillController {

    @Autowired
    private SeckillService seckillService;

    @GetMapping(value = "/createOrder")
    public String createOrder(String productId,String userId){
        return seckillService.createOrder(productId,userId);
    }
}
